package com.zg.third.qcc.service.impl;


import com.zg.third.api.domain.req.ZtQccEnReq;
import com.zg.third.api.domain.vo.ZtQccEnterpriseInfoVo;
import com.zg.third.qcc.service.ZtQccService;
import com.zg.third.qcc.utils.ZtQccUtil;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

@Service
@RequiredArgsConstructor
public class ZtQccServiceImpl implements ZtQccService {

    private final ZtQccUtil qccUtil;

    @Override
    public ZtQccEnterpriseInfoVo getByCreditCode(ZtQccEnReq req) {
        if(req.getCreditCode().length() < 16) {
            return null;
        }
        // 调用企查查接口
        return qccUtil.loadData(req.getCreditCode());
    }
}
